#region (c) 2014 THN Solutions LLC. - All rights reserved
/*
THN TELEPORT version 2

Copyright (c) 2014, THN Solutions LLC. ( www.ThnSolutions.com )
Author: Nguyễn, M. Hải                 ( www.Minh-Hai.com     )
All rights reserved.

This library is dual-licensed.
  + For commercial software, please obtain a commercial license from THN Solutions LLC.

  + For free software, this library is licensed under GPL version 3. A summary of GPLv3 is
    listed below. You should also find a copy of GPLv3 as file License_GPLv3.txt included
	with the source-code files.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 3 as published by
    the Free Software Foundation  of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#endregion

#region Record of Change
//             							CHANGE HISTORY
// -------------------------------------------------------------------------------------
// |   DATE    | DEVELOPER  | DESCRIPTION                                              |
// -------------------------------------------------------------------------------------
// | 21-Apr-09 | HaiNM      | First creation.                                          |
// -------------------------------------------------------------------------------------
//
#endregion

#region Record of Audit
//             							REVIEW HISTORY
// -------------------------------------------------------------------------------------
// |   DATE    | REVIEWER   | NOTES                                                    |
// -------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------
//
#endregion

#region Using directives
using System;
#endregion

namespace Demo.Business
{
    /// <summary>
    /// Sample business service. This service is registered as gateway ProductService in Teleport.
    /// </summary>
    public class ProductService
    {
        #region Ping
        /// <summary>
        /// A test method to check whether we can talk to this service.
        /// </summary>
        public string Ping()
        {
            return "Ping back from product service.";
        }
        #endregion

        #region Hello
        /// <summary>
        /// Another test method to check whether we can transmit data to this service.
        /// </summary>
        public string Hello(string name)
        {
            return "Hi, " + name;
        }
        #endregion

        #region Get Random Product
        /// <summary>
        /// Gets a random product object.
        /// This test checks whether we can reply with a custom object.
        /// </summary>
        public Product GetRandomProduct()
        {
            return Product.CreateRandom();
        }
        #endregion

        #region Get Random List
        /// <summary>
        /// Gets a list of random products;
        /// </summary>
        public ProductList GetRandomList()
        {
            return Product.CreateRandomList();
        }
        #endregion

        #region Add Product
        /// <summary>
        /// This test checks whether we can receive a custom object.
        /// </summary>
        public string AddProduct(Product p)
        {
            return string.Format("Added product with name: {0}", p.Name);
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Default constructor
        /// </summary>
        public ProductService() 
        { }
        #endregion
    }
}
